package com.example.work.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.work.entity.DbUser;

import com.example.work.mapper.DbUserMapper;
import com.example.work.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**

 */
@Service("userService")
public class IUserServiceImpl extends ServiceImpl<DbUserMapper, DbUser> implements IUserService {
    @Autowired
    private DbUserMapper dbUserMapper;
    @Override
    public boolean updateUserById(DbUser dbuser) {
        // 调用 BaseMapper 的 updateById 方法
        return this.updateById(dbuser);
    }
    @Override
        public DbUser getUserByUsername(String userName) {
            // 调用自定义方法查询用户信息
            return dbUserMapper.getUserByUsername(userName);
        }

}
